package com.txzt.gaea.upgrade.project.service;

import com.txzt.gaea.common.base.service.BaseService;
import com.txzt.gaea.upgrade.project.domain.model.ProjectDelay;
import com.txzt.gaea.upgrade.project.domain.model.ProjectMain;
import com.txzt.gaea.upgrade.project.domain.model.ProjectStop;
import com.txzt.gaea.upgrade.project.domain.vo.ProjectMainVo;
import com.txzt.gaea.upgrade.project.domain.vo.ProjectProgressVo;

import javax.servlet.http.HttpServletResponse;
import java.util.List;


public interface IProjectMainService extends BaseService<ProjectMain> {


    /**
     * 开题拟制 - 编辑/提交
     * @param projectMain
     * @return
     */
    int openDraftEdit(ProjectMain projectMain);

    /**
     * 开题评审 - 编辑/提交
     * @param projectMain
     * @return
     */
    int openReviewEdit(ProjectMain projectMain);

    /**
     * 开题评审 - 汇总评审
     * @param mainList
     * @return
     */
    int openReviewCollect(List<ProjectMain> mainList);

    /**
     * 开题提报 - 编辑/提交
     * @param projectMain
     * @return
     */
    int openSubmitEdit(ProjectMain projectMain);

    /**
     * 开题提报 - 汇总提报
     * @param mainList
     * @return
     */
    int openSubmitCollect(List<ProjectMain> mainList);

    /**
     * 结题申请 - 编辑/提交
     * @param projectMain
     * @return
     */
    int finishApplyEdit(ProjectMain projectMain);

    /**
     * 结题评审 - 编辑/提交
     * @param projectMain
     * @return
     */
    int finishReviewEdit(ProjectMain projectMain);

    /**
     * 结题评审 - 汇总评审
     * @param mainList
     * @return
     */
    int finishReviewCollect(List<ProjectMain> mainList);

    /**
     * 结题呈报 - 编辑/提交
     * @param projectMain
     * @return
     */
    int finishSubmitEdit(ProjectMain projectMain);

    /**
     * 结题呈报 - 汇总呈报
     * @param mainList
     * @return
     */
    int finishSubmitCollect(List<ProjectMain> mainList);

    /**
     * 项目延期 - 提交
     *
     * @param projectDelay
     * @return
     */
    int projectDelay(ProjectDelay projectDelay);

    /**
     * 项目终止 - 提交
     *
     * @param projectStop
     * @return
     */
    int projectStop(ProjectStop projectStop);

    /**
     *
     * 项目延期 - 项目id查询
     *
     * @param projectId
     */
    List<ProjectDelay> getDelayByProjectId(Long projectId);

    /**
     *
     * 项目终止 - 项目id查询
     *
     * @param projectId
     */
    List<ProjectStop> getStopByProjectId(Long projectId);


    /**
     *
     * 项目延期 - id查询
     *
     * @param delayId
     */
    ProjectDelay queryByDelayId(Long delayId);

    /**
     *
     * 项目终止 - id查询
     *
     * @param stopId
     */
    ProjectStop queryByStopId(Long stopId);

    /**
     * 提交审核数据撤回
     * @param projectMain
     * @return
     */
    int revocationProjectMain(ProjectMain projectMain);

    /**
     * 根据计划编号查询项目信息
     * @param planNo
     * @return
     */
    ProjectMain selectProjectByPlanNo(String planNo);

    List<ProjectMainVo> getProjectFund(ProjectMainVo projectMainVo);

    List<ProjectProgressVo> getProjectProgress(ProjectProgressVo projectProgressVo);

    /**
     * 项目延期申请信息导出
     * @param id
     * @param response
     * @throws Exception
     */
    void exportWordProjectDelay(Long id, HttpServletResponse response) throws Exception;

    /**
     * 项目终止申请信息导出
     * @param id
     * @param response
     * @throws Exception
     */
    void exportWordProjectStop(Long id, HttpServletResponse response) throws Exception;



    /**
     * 项目结题申请信息导出
     * @param id
     * @param response
     * @throws Exception
     */
    void exportWordProjectFinish(Long id, HttpServletResponse response) throws Exception;

    /**
     * 查询待审核数量(开题报告管理)
     * @param projectMain
     * @return
     */
    Long listCheckCount(ProjectMain projectMain);
}
